﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace PopShops.Entities
{
    public class MerchantType
    {
        #region Public Properties

        [XmlAttribute("id")]
        public int MerchantTypeID { get; set; }
        [XmlAttribute("merchant_count")]
        public long MerchantCount { get; set; }
        [XmlAttribute("name")]
        public string Name { get; set; }
        [XmlAttribute("deal_count")]
        public string DealCount { get; set; }
        [XmlAttribute("product_count")]
        public string ProductCount { get; set; }

        #endregion

        #region Ctor

        public MerchantType()
        { }

        public MerchantType(int id, string name, long merchant_count)
        {
            this.MerchantTypeID = id;
            this.Name = name;
            this.MerchantCount = merchant_count;
        }

        #endregion
    }

    [XmlRoot("merchant_types")]
    public class MerchantTypes
    {
        public MerchantTypes()
        { }

        [XmlAttribute("total_count")]
        public long TotalCount { get; set; }

        [XmlElement("merchant_type")]
        public List<MerchantType> MerchantTypeCollection { get; set; }
    }
}